﻿#ifndef EDITTREEWIDGET_H
#define EDITTREEWIDGET_H

#include <QWidget>
#include <QTreeWidget>
#include <QMessageBox>
#include "XTWidget.h"

class ModelListWidget;
class MoveModelWidget;
class RotateModelWidget;
class ScaleModelWidget;
class CutModelWidget;
class ManualSupportWidget;

class EditTreeWidget:public QTreeWidget
{
	Q_OBJECT

public:
	EditTreeWidget(QWidget *parent=0);
	~EditTreeWidget();

	int heightValue();

	void update();


    void Bind(QString filepath);

    int GetWidgetHeight();
    int GetNumofExpand();

	void ResizeControl();

signals:
	void ItemExpandStateChanged();
	void changeStyle(bool style);
	void sendMousePress(QMouseEvent *event);
	void sendMouseRelease(QMouseEvent *event);
	void sendMouseMove(QMouseEvent *event);
	void signExitSupportWork();


protected:

	void mouseReleaseEvent(QMouseEvent *event);
	void mouseMoveEvent(QMouseEvent *event)
	{
	emit sendMouseMove(event);
	QTreeWidget::mouseMoveEvent(event);
	}

private:
    int sbvalue;
	bool dataChanged;
    int height[7];

	QVector<XTWidget*> vWidget;

	/*QWidget* mlw;
	QWidget* mmw;
	QWidget* rmw;
	QWidget* smw;
	QWidget* cmw;
	QWidget* msw;*/

	bool m_change;

	void OnScrollBarValueChanged(int value);

public slots:
void on_checked_change(int state);

void on_combobox_change(const QString& text);

void on_slider_change(int state);

};

#endif // EDITTREEWIDGET_H
